package com.jiuyi.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiuyi.entity.Category;
import com.jiuyi.entity.Dish;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * DATA: 2022/10/19
 * Author: 晨夕
 */
@Mapper
public interface DishMapper extends BaseMapper<Dish> {
    //查看分类是否绑定菜品
    Dish selectCategoryInDish(@Param("ids") Long ids);
    //获取菜品id
    Long selectDishName(@Param("name")String name);
    //查询菜品
    List<Dish> selectDishList(@Param("i")int i, @Param("pageSize")int pageSize, @Param("name")String name);
    //查询菜品数量
    int selectDishCount(@Param("name")String name);
    //停售菜品
    void updateStatusById(@Param("ids")Long[] ids);
    //批量起售菜品
    void updateStatusByIds(@Param("ids")Long[] ids);
    //查询菜品集合
    List<Dish> selectDishListByCategoryId(@Param("categoryId")Long categoryId,@Param("name") String name);
}
